from django.contrib import admin
from .models import *


# Register your models here.

@admin.register(Activity)
class AdminActivity(admin.ModelAdmin):
    list_per_page = 50
    list_display = ['name', 'status', 'activity_type', 'create_time', 'release_time',
                    'sign_up_start_time', 'sign_up_end_time', 'begin_time', 'sponsor', 'group_name']
    list_filter = ['status']
    search_fields = ['name', 'sponsor', 'group_name']


@admin.register(ActivityType)
class AdminActivityType(admin.ModelAdmin):
    list_per_page = 20
    list_display = ['name', 'creator', 'create_time']


@admin.register(ActivityMission)
class AdminActivityMission(admin.ModelAdmin):
    list_per_page = 50
    list_display = ['name', 'mission_type', 'end_time']
    list_filter = ['mission_type']
    search_fields = ['name']


@admin.register(ActivityTypeTemplate)
class AdminActivityTypeTemplate(admin.ModelAdmin):
    list_per_page = 20
    list_display = ['related_activity_type']
